
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
legato-dnd
Advanced tools
Lite, fast, Beautiful and configurable drag & drop list.
Demo: Legato Dnd React Demo
Use with frameworks:
# npm
npm install legato-dnd
# yarn
yarn add legato-dnd
const el = document.getElementById('container')
for (let i = 0; i < 10; ++i) {
let child = document.createElement('div')
child = Legato.draggable(child)
el.append(child)
}
const container = new Legato.DragDrop({ container: el })
props from Container, usage:
type ScrollDeltaFunctionType = ({state}: { state: ParentState }) => number
type PlaceholderFunctionType = () => HTMLElement
type MoveGroup = [number, number]
interface DragDropProps {
container: HTMLElement,
vertical?: boolean, // default false
groups?: MoveGroup[],
transitionDuration?: number, // default 200
placeholder?: HTMLElement | PlaceholderFunctionType,
scrollSpeed?: ScrollDeltaFunctionType,
scrollThreshold?: number, // default 0
lockCrossAxis?: boolean, // default false
lockArea?: boolean, // default false
startDelay?: number, // default 0
touchStartDelay?: number, // default 200
startOffsetTolerate?: number, // default 5
name?: string,
inactiveClass?: string,
startActiveClass?: string,
dragActiveClass?: string,
dropActiveClass?: string,
}
basic usage:
const dragDrop = new DragDrop(options)
dragDrop.on('dragStart', () => {
console.log('dragStart')
})
dragDrop.on('orderChange', ({from, to, order}) => {
// do something
})
// position event
export interface EnterViewportEdgeEvent {
state: ParentState
}
export interface LeaveViewportEdgeEvent {
state: ParentState
}
export interface EnterContainerEdgeEvent {
intersectState: IntersectState
}
export interface LeaveContainerEdgeEvent {
intersectState: IntersectState
}
// scroll
export interface ProgrammingScrollStartEvent {
startTime: number,
state: ParentState
}
export interface ProgrammingScrollEndEvent {
startTime: number,
endTime: number,
endState: ParentState,
startState: ParentState
}
export interface ProgrammingScrollErrorEvent {
startTime: number,
state: ParentState,
scrollDelta: number
}
export interface ProgrammingScrollEvent {
startTime: number,
state: ParentState,
scrollDelta: number,
offset: number
}
// lifestyle
export interface BeforeDragStartEvent {
startIndex: number,
startGroup: MoveGroup,
cancel: () => void
}
export interface DragStartEvent {
startIndex: number,
startGroup: MoveGroup,
}
export interface DragOverEvent {
startIndex: number,
startGroup: MoveGroup,
currentIndex: number,
currentGroup: MoveGroup
}
export interface DragCrossEvent {
order: number[],
startIndex: number,
startGroup: MoveGroup,
currentIndex: number,
currentGroup: MoveGroup
lastCurrentIndex: number,
}
export interface BeforeDropEvent {
startIndex: number,
startGroup: MoveGroup,
endIndex: number,
endGroup: MoveGroup
}
export interface DropEvent {
startIndex: number,
startGroup: MoveGroup,
endIndex: number,
endGroup: MoveGroup
}
export interface DragEndEvent {
startIndex: number,
startGroup: MoveGroup,
endIndex: number,
endGroup: MoveGroup,
order: number[]
}
export interface OrderChangeEvent {
order: number[],
startIndex: number,
startGroup: MoveGroup,
endIndex: number,
endGroup: MoveGroup
}
FAQs
Lite, fast, Beautiful and configurable drag & drop list.
We found that legato-dnd demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.